<script type="text/javascript">
function _show_area(_this,_id) {
		isSearchHidden=$(_this).attr('rel');
		if(isSearchHidden == 1) {
				$("#pcat_list").find('#div_'+_id).slideDown("fast");
				$(_this).addClass('soff');
				$(_this).attr('rel',0);
		}else {
				$("#pcat_list").find('#div_'+_id).slideUp("fast");
				$(_this).removeClass('soff');
				$(_this).attr('rel',1);
		}
}	
</script>
  <php>
			if(empty($alp_cataroot))$alp_cataroot 	= service('Dict')->findByCode('goods');
			if(empty($alp_catagoods))$alp_catagoods 	= service('Dict')->getAllDictByCode('goods',' `id_path` ,`order` ');
	</php>

  <!--左侧导航-->
  <div id="pcat_list">
  	
  	<div class="cat">
	    <div class="pcat_top">商品分类</div>
	    <div class="pcat_middle">
	    	<php>	$alp_tmp_subid;
	    				foreach($alp_catagoods as $vo1){
	    					if($vo1['pid']==$alp_cataroot['id']){
	    						$alp_tmp_subid = $vo1['id'];
	    	</php>
						      <dl class="catlist" style="border-top:none;">
						        <dt><a 
						        	<php>if($sscode==''&&$scode==$vo1['code'])echo " class='red' ";</php>
						        	href="{:U('Product://Index/searchp',array('scode'=>$vo1['code']))}" title="{$vo1['desc']}"><b>{$vo1['desc']}</b></a>
						        	<php>	if($scode!=$vo1['code']){
							        				$tmp_soff=''; $tmp_rel='1';
						        				}else{
						        					$tmp_soff='soff'; $tmp_rel='0';
						        		}</php>
						        	<span class="son {$tmp_soff}" onclick="_show_area(this,'{$vo1['id']}')" rel='{$tmp_rel}'></span>
						       
						        </dt>
						        <div id="clear"></div>
						        <dl <php>if($tmp_rel==1) echo "style='display: none;'";</php> id="div_{$vo1['id']}">
							        <php>foreach($alp_catagoods as $vo2){
							        				if($alp_tmp_subid==$vo2['pid']){
							        </php>				
							        		
								        	<dd <php>if($sscode==$vo2['code'])echo " id='list_on' ";</php>> 
								        		<a <php>if($sscode==$vo2['code'])echo " class='red' ";</php> href="{:U('Product://Index/searchp',array('scode'=>$vo1['code'],'sscode'=>$vo2['code']))}" title="{$vo2['desc']}">{$vo2['desc']}</a> 
								        	</dd>
								        	<div id="clear"></div>
							     	<php>}
							     	}
							     	</php>
							    </dl>
							    <div id="clear"></div>
						      </dl>
						      <div id="clear"></div>
	      <php>		}
	      		 }
	      </php>
	      <div class="blank10"></div>
	    </div>
	    
   		<div class="pcat_bottom"></div>
    </div>

    <div class="clear"></div>
	<include file="../Product/Tpl/default/Public/product_history_box.html" />
</div>
   
